{extend name="../front" /}
{block name="head"}
<title>{:config('site.name')}－{:config('site.title')}</title>
<meta name="keywords" content="{$keywords}" />
<meta name="description" content="{$description}" />
{/block}
{block name="main"}
<main class="container">
  {if $notice}
  <div class="alert alert-dark alert-dismissible mb-4">
    <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
    {$notice|raw}
  </div>
  {/if}
  <div class="row row-cols-2 g-4 mb-4">
    {volist name="items" id="item"}
    <div class="col">
      <div class="card shadow-sm">
        <div class="card-body d-flex">
          <i class="fs-1 me-3 {$item.icon}"></i>
          <div class="px-1">
            <h5 class="card-title fw-bold"><a href="{:dcUrl('index/'.$item['controll'].'/index')}">{$item.title}</a></h5>
            <p class="card-text text-muted">{$item.description|dcSubstr=0,70}</p>
            <p class="card-text"><a class="btn btn-dark btn-sm" href="{:dcUrl('index/'.$item['controll'].'/index')}">{gt name="item.score" value="0"}积分使用{else/}免费使用{/gt}</a></p>
          </div>
        </div>
      </div>
    </div>
    {/volist}
    {if $links = dcSelect('common/Link',['order'=>['link_id'=>'desc']])}
    <div class="col-12">
      <h6 class="fw-bold mb-2">友情链接</h6>
      <p class="mb-0">
      {volist name="links" id="item"}
      <a class="text-muted" href="{$item.link_url}" target="_blank">{$item.link_name}</a>
      {/volist}
      </p>
    </div>
    {/if}
  </div>
</main>
{/block}